Repository navigation
perf(start): build while the containers start, start side by side, keep a node's artifacts - #339
Merged
Merged
Conversation
…ows side by side, keep a node's artifacts The pool's telemetry showed a lane on a node taking ~154 s: 11 s on the node, then 51 s waiting for its containers before any build, its Compose groups one after the other, every .NET service built anew (~37 s, where a local lane reuses the main tree's artifacts), and the services one after the other. - `up_all`: the infrastructure starts in a thread while the services that start with the tree and have nothing to restore are built (`prebuilt` in the log); a build that fails there is built again by its start. - Services whose `after` is done start side by side (levels of the `after` graph; a failed one still holds back only what comes after it). - Compose groups no `after` orders start side by side, in the daemon and in the node's agent for a lane there. - A node keeps the member's build artifacts in its store (`artifacts/<service>/<build id>-<lane image>`), read-only in the lane, new ones through its outbox, taken in, swept and counted with the store; a build that finds its artifact copies it (`build_reused`, `source: store`). ADR-0062 addendum, on the card approved 2026-10-28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mock's enrolment record Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acts' Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s instance is waited for, as a front's With services starting side by side, a service could reach its port while the previous daemon's instance still held it (seen on macOS after a restart that carried a lane over). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e build's store lines came Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are and links Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
added a commit
that referenced
this pull request
Oct 28, 2026
…' start Since services build while the containers start (#339), a service went building -> stopped before its start; run-lane took that as settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
added a commit
that referenced
this pull request
Oct 28, 2026
* fix(cli): devstack up waits for the containers too (#66) A stack of Compose groups alone has no autostart service, so up answered right away while its images were still built. It now follows every container its groups start until it runs (healthy, with a health check) or ran to completion; one not ready 300 s after the services, or a group's Docker error that holds for 10 s, fails the up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(pool): node run-lane does not take a build ahead for the services' start Since services build while the containers start (#339), a service went building -> stopped before its start; run-lane took that as settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The pool's telemetry (3 days) showed a lane on a node starting in ~154 s: lease, sync and the lane container 11 s; then 51 s waiting for its containers before any build (groups one after the other); every .NET service built anew, ~37 s, where a local lane reuses the main tree's artifacts; the services one after the other. A local lane took ~172 s the same way; the main tree is faster because its containers run and its artifacts exist.
Supervisor::up_all,prebuild): the infrastructure starts in a thread; meanwhile each service that starts with the tree, hasbuildand nothing to restore (ADR-0016) is built, logged asprebuilt. Its start then finds the artifact. A build that fails there (one that needs a container after all) is built again by its start, which says why.afterallows: levels of theaftergraph (levels), each level's services started in parallel; a failed one still holds back only what comes after it.afterorders them:infra_up(local, by levels) andInfraUp::runin the node's agent (a lane on a node), the state file written by one group at a time.artifacts/<service>/<build id>-<lane image hash>in the member's store there): read-only in the lane container, what it builds goes through its outbox, which the agent takes in; swept and counted with the store. A build that finds its artifact copies it (build_reusedwithsource: store). An older agent does not take them in (nothing breaks).Expected for the measured lane: roughly 154 s → 70–80 s.
Review card
Shown and approved in the conversation, 2026-10-28 (point 4 above; 1–3 are ordering, decided by the agent):
preparestore (ADR-0062); a lane that builds a service with the same build inputs as a lane before it takes that artifact instead of building.artifacts/<service>/<key>; swept like thepreparestore.Decided by the agent: copied (not linked); sweep and room as the
preparestore;build_reusedwithsource: store; the image as a 12-hex blake3 ofDEVSTACK_LANE_IMAGE; levers 1–3 (ordering, no card category).Approved by the owner: 2026-10-28, points 1–4.
Tests
level_tests: what noafterorders shares a level.remote_lane.rs(CIremote-lane): afterlane reset, the second start's telemetry hasbuild_reusedwithsource: store.cargo test -p devstack-daemon -p devstack-node, clippy; the Docker/.NET integration tests (daemon_lifecycle, all) run against levers 1–3.🤖 Generated with Claude Code